﻿@page
@{ Layout = "_Layout"; }

<el-table
  :data="contents"
  style="width: 100%;"
  size="small"
  row-key="id"
  stripe>
  <el-table-column prop="id" label="内容Id" width="80"></el-table-column>
  <el-table-column
    label="内容标题"
    show-overflow-tooltip>
    <template slot-scope="scope">
      <el-link type="primary" :underline="false" :href="getContentUrl(scope.row)" v-html="scope.row.title" target="_blank" v-on:click.stop.native></el-link>
    </template>
  </el-table-column>
  <el-table-column prop="addDate" label="添加时间"  width="150"></el-table-column>
  <el-table-column
    fixed="right"
    width="90"
    align="center"
    show-overflow-tooltip
    label="状态">
    <template slot-scope="scope">
      <el-link size="mini" :underline="false" :type="(scope.row.checked ? 'primary' : 'danger')">
        {{ scope.row.checked ? '已审核' : '待审核' }}
      </el-link>
    </template>
  </el-table-column>
</el-table>

<el-divider></el-divider>
<div style="height: 10px"></div>

<el-form v-on:submit.native.prevent size="small" ref="form" :model="form" label-width="120px">
  <el-form-item label="复制到站点" prop="transSiteIds" :rules="{ required: true, message: '请选择复制到的站点' }">
    <el-cascader
      v-model="form.transSiteIds"
      :options="transSites"
      :props="{ checkStrictly: true }"
      :multiple="false"
      v-on:change="handleTransSiteIdChange"
      filterable
      placeholder="请选择站点">
    </el-cascader>
  </el-form-item>
  <el-form-item v-if="transChannels" label="复制到栏目" prop="transChannelIds" :rules="{ required: true, message: '请选择复制到的栏目' }">
    <el-cascader
      v-model="form.transChannelIds"
      :options="transChannels"
      :props="{ checkStrictly: true, multiple: true }"
      filterable 
      placeholder="请选择栏目">
      <template slot-scope="{ node, data }">
        <span>{{ data.label }}</span>
        <span> ({{ data.count }}) </span>
      </template>
    </el-cascader>
  </el-form-item>
  <el-form-item label="复制方式" prop="copyType" :rules="{ required: true, message: '请选择复制方式' }">
    <el-radio v-model="form.copyType" label="Copy">完整复制</el-radio>
    <el-radio :disabled="siteId !== getTransSiteId()" v-model="form.copyType" label="Reference">引用地址</el-radio>
    <div v-if="form.copyType === 'Copy'" class="tips">
      “完整复制”将创建内容的副本，并拷贝到指定栏目下，副本和原始内容之间不存在关系
    </div>
    <div v-if="form.copyType === 'Reference'" class="tips">
      “引用地址”将创建内容的副本，并拷贝到指定栏目下，内容副本仅是原内容的引用，内容副本链接将和原内容链接一致
    </div>
  </el-form-item>
</el-form>

<el-divider></el-divider>
<el-row align="right" style="margin-right: 5px; margin-top: 10px;">
  <el-col :span="24" align="right">
    <el-button size="small" type="primary" v-on:click="btnSubmitClick">确 定</el-button>
    <el-button size="small" v-on:click="btnCancelClick">取 消</el-button>
  </el-col>
</el-row>

@section Scripts{
<script src="/sitefiles/assets/js/admin/cms/contentsLayerCopy.js" type="text/javascript"></script> }